function Toast(msg,duration){
    duration=isNaN(duration)?3000:duration;
    var m = document.createElement('div');
    m.innerHTML = msg;
    m.style.cssText="width: 60%;\n" +
        "    min-width: 150px;\n" +
        "    opacity: 0.7;\n" +
        "    height: 50px;\n" +
        "    color: rgb(255, 255, 255);\n" +
        "    line-height: 50px;\n" +
        "    text-align: center;\n" +
        "    border-radius: 10px;\n" +
        "    position: fixed;\n" +
        "    top: 40%;\n" +
        "    left: 20%;\n" +
        "    z-index: 999999;\n" +
        "    background: rgb(0, 0, 0);\n" +
        "    font-size: 18px;";
    document.body.appendChild(m);
    setTimeout(function() {
        var d = 0.5;
        m.style.webkitTransition = '-webkit-transform ' + d + 's ease-in, opacity ' + d + 's ease-in';
        m.style.opacity = '0';
        setTimeout(function() { document.body.removeChild(m) }, d * 1000);
    }, duration);
    return m;
}